﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：YS_LH_BIAOJIYSZX实体层次
//********************************************************************************//
#region Entity
namespace Entity
{
    using System;
    using System.Xml;
    [Serializable()]
    public class YS_LH_BIAOJIYSZX
    {

        private string m_str_s_laihanbh;
        /// <summary>
        /// 
        /// </summary>
        public string S_LAIHANBH { get { return m_str_s_laihanbh; } set { m_str_s_laihanbh = value; } }

        private decimal? m_dec_i_shurur;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_SHURUR { get { return m_dec_i_shurur; } set { m_dec_i_shurur = value; } }

        private DateTime? m_DT_d_shururq;
        /// <summary>
        /// 
        /// </summary>
        public DateTime? D_SHURURQ { get { return m_DT_d_shururq; } set { m_DT_d_shururq = value; } }

        private decimal? m_dec_i_jlzt;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_JLZT { get { return m_dec_i_jlzt; } set { m_dec_i_jlzt = value; } }

        private decimal m_dec_id;
        /// <summary>
        /// 
        /// </summary>
        public decimal ID { get { return m_dec_id; } set { m_dec_id = value; } }

        private decimal? m_dec_i_liuchengbh;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_LIUCHENGBH { get { return m_dec_i_liuchengbh; } set { m_dec_i_liuchengbh = value; } }

        private decimal? m_dec_i_shenpil;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_SHENPIL { get { return m_dec_i_shenpil; } set { m_dec_i_shenpil = value; } }

        private string m_str_s_shenpiyj;
        /// <summary>
        /// 
        /// </summary>
        public string S_SHENPIYJ { get { return m_str_s_shenpiyj; } set { m_str_s_shenpiyj = value; } }

        private decimal? m_dec_i_feiyongbh;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_FEIYONGBH { get { return m_dec_i_feiyongbh; } set { m_dec_i_feiyongbh = value; } }

        private double? m_db_n_ysj;
        /// <summary>
        /// 
        /// </summary>
        public double? N_YSJ { get { return m_db_n_ysj; } set { m_db_n_ysj = value; } }

        private decimal? m_dec_i_jiajiacs;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_JIAJIACS { get { return m_dec_i_jiajiacs; } set { m_dec_i_jiajiacs = value; } }

        private decimal? m_dec_i_shiyongsl;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_SHIYONGSL { get { return m_dec_i_shiyongsl; } set { m_dec_i_shiyongsl = value; } }

        private decimal? m_dec_i_jiajiaysl;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_JIAJIAYSL { get { return m_dec_i_jiajiaysl; } set { m_dec_i_jiajiaysl = value; } }

        private double? m_db_n_jiajiaje;
        /// <summary>
        /// 
        /// </summary>
        public double? N_JIAJIAJE { get { return m_db_n_jiajiaje; } set { m_db_n_jiajiaje = value; } }

        private double? m_db_n_yingshouje;
        /// <summary>
        /// 
        /// </summary>
        public double? N_YINGSHOUJE { get { return m_db_n_yingshouje; } set { m_db_n_yingshouje = value; } }

        private double? m_db_n_shishouje;
        /// <summary>
        /// 
        /// </summary>
        public double? N_SHISHOUJE { get { return m_db_n_shishouje; } set { m_db_n_shishouje = value; } }

        private string m_str_s_yonghuh;
        /// <summary>
        /// 
        /// </summary>
        public string S_YONGHUH { get { return m_str_s_yonghuh; } set { m_str_s_yonghuh = value; } }

        private decimal? m_dec_i_zwym;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_ZWYM { get { return m_dec_i_zwym; } set { m_dec_i_zwym = value; } }

        private string m_str_s_caozuor;
        /// <summary>
        /// 
        /// </summary>
        public string S_CAOZUOR { get { return m_str_s_caozuor; } set { m_str_s_caozuor = value; } }

        private DateTime? m_DT_d_caozuosj;
        /// <summary>
        /// 
        /// </summary>
        public DateTime? D_CAOZUOSJ { get { return m_DT_d_caozuosj; } set { m_DT_d_caozuosj = value; } }

        private double? m_db_n_hexiaoje;
        /// <summary>
        /// 
        /// </summary>
        public double? N_HEXIAOJE { get { return m_db_n_hexiaoje; } set { m_db_n_hexiaoje = value; } }

        private decimal? m_dec_i_yuanjihua;
        /// <summary>
        /// 
        /// </summary>
        public decimal? I_YUANJIHUA { get { return m_dec_i_yuanjihua; } set { m_dec_i_yuanjihua = value; } }

        private double? m_db_n_qianfeije;
        /// <summary>
        /// 
        /// </summary>
        public double? N_QIANFEIJE { get { return m_db_n_qianfeije; } set { m_db_n_qianfeije = value; } }
        public YS_LH_BIAOJIYSZX()
        {
        }
    }
}
#endregion
#region EntityProcess
namespace BLL.Access
{
    using System;
    using System.Data;
    //using System.Data.OracleClient;
    using Entity;
    using System.Configuration;
    using System.Data.Common;
    using Platform.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using Oracle.DataAccess;
    public class YS_LH_BIAOJIYSZXProcess
    {
        #region Field
        protected string conn;
        #endregion
        #region Construction
        public YS_LH_BIAOJIYSZXProcess() { conn = Platform.Configuration.ConfigHelper.PlatformConnString; }
        #endregion
        #region public

        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX实体添加或者修改YS_LH_BIAOJIYSZX信息
        /// </summary>
        public bool InsertOrUpdate(YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX, OracleTransaction Transaction)
        {
            if (YS_LH_BIAOJIYSZX.ID == 0)
            {
                InsertYS_LH_BIAOJIYSZX(YS_LH_BIAOJIYSZX, Transaction);
            }
            else
            {
                UpdateYS_LH_BIAOJIYSZX(YS_LH_BIAOJIYSZX, Transaction);
            }
            return YS_LH_BIAOJIYSZX.ID == 0 ? false : true;
        }

        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX实体添加或修改YS_LH_BIAOJIYSZX信息
        /// </summary>
        public bool InsertOrUpdate(YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX)
        {
            return InsertOrUpdate(YS_LH_BIAOJIYSZX, null);
        }



        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX主键删除YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteYS_LH_BIAOJIYSZX(decimal ID, OracleTransaction Transaction)
        {
            string spName = "CS_DelYS_LH_BIAOJIYSZX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX主键删除YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteYS_LH_BIAOJIYSZX(decimal ID)
        {
            return DeleteYS_LH_BIAOJIYSZX(ID, null);
        }

        /// <summary>
        /// 根据条件删除YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteYS_LH_BIAOJIYSZXesDynamic(string WhereClause, OracleTransaction Transaction)
        {
            string spName = "CS_DelYS_LH_BIAOJIYSZXesDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WhereClause;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        /// 根据条件删除YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteYS_LH_BIAOJIYSZXesDynamic(string WhereClause)
        {
            return DeleteYS_LH_BIAOJIYSZXesDynamic(WhereClause, null);
        }

        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX主键选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public YS_LH_BIAOJIYSZX SelectYS_LH_BIAOJIYSZX(decimal ID, OracleTransaction Transaction)
        {
            string spName = "CS_SelYS_LH_BIAOJIYSZX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            OracleDataReader rd;
            if (Transaction == null)
                rd = OracleHelper.ExecuteReader(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                rd = OracleHelper.ExecuteReader((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (rd.Read())
            {
                YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX = PopulateYS_LH_BIAOJIYSZX(rd);
                rd.Close();
                return YS_LH_BIAOJIYSZX;
            }
            else
                return null;
        }

        /// <summary>
        /// 根据YS_LH_BIAOJIYSZX主键选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public YS_LH_BIAOJIYSZX SelectYS_LH_BIAOJIYSZX(decimal ID)
        {
            return SelectYS_LH_BIAOJIYSZX(ID, null);
        }

        /// <summary>
        /// 选择所有YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>所有YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesAll(OracleTransaction Transaction)
        {
            string spName = "CS_SelYS_LH_BIAOJIYSZXesAll";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }

        /// <summary>
        /// 选择所有YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <returns>所有YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesAll()
        {
            return SelectYS_LH_BIAOJIYSZXesAll(null);
        }

        /// <summary>
        /// 根据条件选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesDynamic(string WhereClause, string OrderByExpression, OracleTransaction Transaction)
        {
            string spName = "CS_SelYS_LH_BIAOJIYSZXesDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }


        /// <summary>
        /// 根据条件选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesDynamic(string WhereClause, string OrderByExpression)
        {
            return SelectYS_LH_BIAOJIYSZXesDynamic(WhereClause, OrderByExpression, null);
        }



        /// <summary>
        /// 根据条件选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesDynamic(string WhereClause, string OrderByExpression, int PageIndex, int PageSize, OracleTransaction Transaction)
        {
            string spName = "CS_SelYS_LH_BIAOJIYSZXesDynPaged";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            storedParams[2].Value = PageIndex;
            storedParams[3].Value = PageSize;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }


        /// <summary>
        /// 根据条件选择YS_LH_BIAOJIYSZX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <returns>YS_LH_BIAOJIYSZX信息</returns>
        public DataTable SelectYS_LH_BIAOJIYSZXesDynamic(string WhereClause, string OrderByExpression, int PageIndex, int PageSize)
        {
            return SelectYS_LH_BIAOJIYSZXesDynamic(WhereClause, OrderByExpression, PageIndex, PageSize, null);
        }

        /// <summary>
        ///根据条件更新YS_LH_BIAOJIYSZX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateYS_LH_BIAOJIYSZXesDynamic(string UpdateValue, string WhereClause, OracleTransaction Transaction)
        {
            int result = 0;
            if (UpdateValue == "" || WhereClause == "")
            {
                return 0;
            }
            string spName = "CS_UpdYS_LH_BIAOJIYSZXDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            storedParams[0].Value = UpdateValue;
            storedParams[1].Value = WhereClause;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            result = Convert.ToInt32(storedParams[2].Value);
            return result;
        }

        /// <summary>
        ///根据条件更新YS_LH_BIAOJIYSZX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateYS_LH_BIAOJIYSZXesDynamic(string UpdateValue, string WhereClause)
        {
            return UpdateYS_LH_BIAOJIYSZXesDynamic(UpdateValue, WhereClause, null);
        }


        #endregion
        #region Private

        private int InsertYS_LH_BIAOJIYSZX(YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX, OracleTransaction Transaction)
        {
            string spName = "CS_InsYS_LH_BIAOJIYSZX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = YS_LH_BIAOJIYSZX.S_LAIHANBH;
            storedParams[1].Value = YS_LH_BIAOJIYSZX.I_SHURUR;
            storedParams[2].Value = YS_LH_BIAOJIYSZX.D_SHURURQ;
            storedParams[3].Value = YS_LH_BIAOJIYSZX.I_JLZT;
            storedParams[4].Value = YS_LH_BIAOJIYSZX.I_LIUCHENGBH;
            storedParams[5].Value = YS_LH_BIAOJIYSZX.I_SHENPIL;
            storedParams[6].Value = YS_LH_BIAOJIYSZX.S_SHENPIYJ;
            storedParams[7].Value = YS_LH_BIAOJIYSZX.I_FEIYONGBH;
            storedParams[8].Value = YS_LH_BIAOJIYSZX.N_YSJ;
            storedParams[9].Value = YS_LH_BIAOJIYSZX.I_JIAJIACS;
            storedParams[10].Value = YS_LH_BIAOJIYSZX.I_SHIYONGSL;
            storedParams[11].Value = YS_LH_BIAOJIYSZX.I_JIAJIAYSL;
            storedParams[12].Value = YS_LH_BIAOJIYSZX.N_JIAJIAJE;
            storedParams[13].Value = YS_LH_BIAOJIYSZX.N_YINGSHOUJE;
            storedParams[14].Value = YS_LH_BIAOJIYSZX.N_SHISHOUJE;
            storedParams[15].Value = YS_LH_BIAOJIYSZX.S_YONGHUH;
            storedParams[16].Value = YS_LH_BIAOJIYSZX.I_ZWYM;
            storedParams[17].Value = YS_LH_BIAOJIYSZX.S_CAOZUOR;
            storedParams[18].Value = YS_LH_BIAOJIYSZX.D_CAOZUOSJ;
            storedParams[19].Value = YS_LH_BIAOJIYSZX.N_HEXIAOJE;
            storedParams[20].Value = YS_LH_BIAOJIYSZX.I_YUANJIHUA;
            storedParams[21].Value = YS_LH_BIAOJIYSZX.N_QIANFEIJE;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            YS_LH_BIAOJIYSZX.ID = Convert.ToInt32(storedParams[22].Value);
            return result;
        }
        private bool UpdateYS_LH_BIAOJIYSZX(YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX, OracleTransaction Transaction)
        {
            string spName = "CS_UpdYS_LH_BIAOJIYSZX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = YS_LH_BIAOJIYSZX.S_LAIHANBH;
            storedParams[1].Value = YS_LH_BIAOJIYSZX.I_SHURUR;
            storedParams[2].Value = YS_LH_BIAOJIYSZX.D_SHURURQ;
            storedParams[3].Value = YS_LH_BIAOJIYSZX.I_JLZT;
            storedParams[4].Value = YS_LH_BIAOJIYSZX.I_LIUCHENGBH;
            storedParams[5].Value = YS_LH_BIAOJIYSZX.I_SHENPIL;
            storedParams[6].Value = YS_LH_BIAOJIYSZX.S_SHENPIYJ;
            storedParams[7].Value = YS_LH_BIAOJIYSZX.I_FEIYONGBH;
            storedParams[8].Value = YS_LH_BIAOJIYSZX.N_YSJ;
            storedParams[9].Value = YS_LH_BIAOJIYSZX.I_JIAJIACS;
            storedParams[10].Value = YS_LH_BIAOJIYSZX.I_SHIYONGSL;
            storedParams[11].Value = YS_LH_BIAOJIYSZX.I_JIAJIAYSL;
            storedParams[12].Value = YS_LH_BIAOJIYSZX.N_JIAJIAJE;
            storedParams[13].Value = YS_LH_BIAOJIYSZX.N_YINGSHOUJE;
            storedParams[14].Value = YS_LH_BIAOJIYSZX.N_SHISHOUJE;
            storedParams[15].Value = YS_LH_BIAOJIYSZX.S_YONGHUH;
            storedParams[16].Value = YS_LH_BIAOJIYSZX.I_ZWYM;
            storedParams[17].Value = YS_LH_BIAOJIYSZX.S_CAOZUOR;
            storedParams[18].Value = YS_LH_BIAOJIYSZX.D_CAOZUOSJ;
            storedParams[19].Value = YS_LH_BIAOJIYSZX.N_HEXIAOJE;
            storedParams[20].Value = YS_LH_BIAOJIYSZX.I_YUANJIHUA;
            storedParams[21].Value = YS_LH_BIAOJIYSZX.N_QIANFEIJE;
            storedParams[22].Value = YS_LH_BIAOJIYSZX.ID;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }


        private YS_LH_BIAOJIYSZX PopulateYS_LH_BIAOJIYSZX(IDataReader dr)
        {
            YS_LH_BIAOJIYSZX YS_LH_BIAOJIYSZX = new YS_LH_BIAOJIYSZX();
            YS_LH_BIAOJIYSZX.S_LAIHANBH = dr["S_LAIHANBH"] == DBNull.Value ? null : (string)dr["S_LAIHANBH"];
            YS_LH_BIAOJIYSZX.I_SHURUR = dr["I_SHURUR"] == DBNull.Value ? null : (decimal?)dr["I_SHURUR"];
            YS_LH_BIAOJIYSZX.D_SHURURQ = dr["D_SHURURQ"] == DBNull.Value ? null : (DateTime?)dr["D_SHURURQ"];
            YS_LH_BIAOJIYSZX.I_JLZT = dr["I_JLZT"] == DBNull.Value ? null : (decimal?)dr["I_JLZT"];
            YS_LH_BIAOJIYSZX.ID = dr["ID"] == DBNull.Value ? (decimal)0 : (decimal)dr["ID"];
            YS_LH_BIAOJIYSZX.I_LIUCHENGBH = dr["I_LIUCHENGBH"] == DBNull.Value ? null : (decimal?)dr["I_LIUCHENGBH"];
            YS_LH_BIAOJIYSZX.I_SHENPIL = dr["I_SHENPIL"] == DBNull.Value ? null : (decimal?)dr["I_SHENPIL"];
            YS_LH_BIAOJIYSZX.S_SHENPIYJ = dr["S_SHENPIYJ"] == DBNull.Value ? null : (string)dr["S_SHENPIYJ"];
            YS_LH_BIAOJIYSZX.I_FEIYONGBH = dr["I_FEIYONGBH"] == DBNull.Value ? null : (decimal?)dr["I_FEIYONGBH"];
            YS_LH_BIAOJIYSZX.N_YSJ = dr["N_YSJ"] == DBNull.Value ? null : (double?)dr["N_YSJ"];
            YS_LH_BIAOJIYSZX.I_JIAJIACS = dr["I_JIAJIACS"] == DBNull.Value ? null : (decimal?)dr["I_JIAJIACS"];
            YS_LH_BIAOJIYSZX.I_SHIYONGSL = dr["I_SHIYONGSL"] == DBNull.Value ? null : (decimal?)dr["I_SHIYONGSL"];
            YS_LH_BIAOJIYSZX.I_JIAJIAYSL = dr["I_JIAJIAYSL"] == DBNull.Value ? null : (decimal?)dr["I_JIAJIAYSL"];
            YS_LH_BIAOJIYSZX.N_JIAJIAJE = dr["N_JIAJIAJE"] == DBNull.Value ? null : (double?)dr["N_JIAJIAJE"];
            YS_LH_BIAOJIYSZX.N_YINGSHOUJE = dr["N_YINGSHOUJE"] == DBNull.Value ? null : (double?)dr["N_YINGSHOUJE"];
            YS_LH_BIAOJIYSZX.N_SHISHOUJE = dr["N_SHISHOUJE"] == DBNull.Value ? null : (double?)dr["N_SHISHOUJE"];
            YS_LH_BIAOJIYSZX.S_YONGHUH = dr["S_YONGHUH"] == DBNull.Value ? null : (string)dr["S_YONGHUH"];
            YS_LH_BIAOJIYSZX.I_ZWYM = dr["I_ZWYM"] == DBNull.Value ? null : (decimal?)dr["I_ZWYM"];
            YS_LH_BIAOJIYSZX.S_CAOZUOR = dr["S_CAOZUOR"] == DBNull.Value ? null : (string)dr["S_CAOZUOR"];
            YS_LH_BIAOJIYSZX.D_CAOZUOSJ = dr["D_CAOZUOSJ"] == DBNull.Value ? null : (DateTime?)dr["D_CAOZUOSJ"];
            YS_LH_BIAOJIYSZX.N_HEXIAOJE = dr["N_HEXIAOJE"] == DBNull.Value ? null : (double?)dr["N_HEXIAOJE"];
            YS_LH_BIAOJIYSZX.I_YUANJIHUA = dr["I_YUANJIHUA"] == DBNull.Value ? null : (decimal?)dr["I_YUANJIHUA"];
            YS_LH_BIAOJIYSZX.N_QIANFEIJE = dr["N_QIANFEIJE"] == DBNull.Value ? null : (double?)dr["N_QIANFEIJE"];
            return YS_LH_BIAOJIYSZX;
        }


        private void AddRowNumber(DataTable dt)
        {
            dt.Columns.Add(new DataColumn("RowNumber", typeof(int)));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][dt.Columns.Count - 1] = i + 1;
            }
        }
        #endregion
    }
}
#endregion